<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>book_list</title>
</head>
<body>

<table border="1">
    <thead>
    <tr>
        <th>序号</th>
        <th>id</th>
        <th>书名</th>
        <th>出版社</th>
    </tr>
    </thead>
    <tbody>
    {% for book in all_books %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ book.pk }}</td>
            <td>{{ book.name }}</td>
            <td>{{ book.publisher.name }}</td>

        </tr>
    {% endfor %}
    </tbody>
</table>
</body>
</html>